package com.chance.cc.crawler.development.command.publish.stats;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.development.command.job.domain.stats.StatsCrawlerScheduleJob;
import com.chance.cc.crawler.development.command.script.stats.StatsCrawlerScript;
import com.chance.cc.crawler.development.command.trigger.domain.stats.StatsScheduleTrigger;

/**
 * @Author Zhao.Hhuan
 * @Date Create in 2020/12/17 17:47
 * @Description
 *      
 *      国家统计局
 **/
public class StatsPublishCrawlerJob {

    public static void main(String[] args) {

        publishCrawlerJob();
    }

    public static void publishCrawlerJob(){
        //发布采集job
        CrawlerJob crawlerJob = StatsCrawlerScheduleJob.publishCrawlerScheduleJobInfo();
        StatsScheduleTrigger.publishScheduleTriggerInfo(crawlerJob.generateCrawlerKey(), crawlerJob.generateCrawlerTriggerKey());
        StatsCrawlerScript.publishCrawlerNodeScript();

    }
}
